package yxy.game.pm2.bean.timeline;

import yxy.apple.logger.Logger;

abstract public class FutureRunnable implements Runnable {
	private static final Logger logger = Logger.create(FutureRunnable.class);

	abstract public long period();

	abstract public void init();

	abstract public void tick();

			
	@Override
	public void run() {
		long start = System.currentTimeMillis();
		tick();
		long time = System.currentTimeMillis() - start;
		if (time > 100) {
			logger.info("\ttick:\t耗时%s:\t%s", time, this.getClass().getSimpleName());
		}
	}
}
